#include <bits/stdc++.h>
using namespace std;
int main()
{
    char c1,c2,c3;
    cin>>c1>>c2>>c3;
    if (c3!='0')
    {
    	cout<<c3<<c2<<c1<<endl;
	}
    else 
    {
    	if (c2!='0')
    	{
    		cout<<c2<<c1<<endl;
		}
		else cout<<c1<<endl;
	}
	
	return 0;
}